#!/bin/bash

# 官方脚本安装
curl -fsSL get.docker.com -o get-docker.sh

# 选择从阿里镜像源下载
sh get-docker.sh --mirror Aliyun

# 加入安全组
usermod -aG docker $USER

# 重启 docker
systemctl daemon-reload
systemctl restart docker

# 安装 docker-compose
#curl -L https://get.daocloud.io/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

# 安装 docker-compose v1.17.1
curl -L https://cos-bj-1259489387.cos.ap-beijing.myqcloud.com/108e1b70a41e2a453e70932e56935ef6. > /usr/local/bin/docker-compose

# 设置权限 docker-compose
chmod +x /usr/local/bin/docker-compose
